{{ define "main" }}

{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script src="{{ $enquire.RelPermalink }}"></script>

<main class="main-main">
  {{ partial "body/breadcrumb" . }}
  <article class="list">
    <header class="list__header">
      <h5 class="list__header--title h5">{{.Title}}</h5>
    </header>
    
    <div class="list__header--desc p2">
      {{.Content}}
    </div>

    <div class="summary__container">
      {{ range .Paginator.Pages }}
      {{ .Render "summary" }}
      {{ end }}
    </div>
  </article>

  {{ partial "pagination/pagination" . }}
</main>
<aside class="main-side">
  {{ partial "sidebar/sidebar-list" . }}
</aside>
<script>
  enquire.register("screen and (max-width: 769px)", {
    match: function () {
      if (document.getElementsByTagName('main')[0]) {
        document.getElementsByTagName('main')[0].className = "main";
      }
      if (document.getElementsByTagName('aside')[0]) {
        document.getElementsByTagName('aside')[0].className = "hide";
      }
    },
    unmatch: function () {
      if (document.getElementsByTagName('main')[0]) {
        document.getElementsByTagName('main')[0].className = "main-main";
      }
      if (document.getElementsByTagName('aside')[0]) {
        document.getElementsByTagName('aside')[0].className = "main-side";
      }
      document.getElementsByClassName('navbar__burger')[0].classList.remove('is-active');
      document.getElementsByClassName('navbar__menu')[0].classList.remove('is-active');
      document.getElementsByClassName('mobile-search')[0].classList.add('hide');
    },
    setup: function () { },
    deferSetup: true,
    destroy: function () { },
  });
</script>
{{ partial "script/taxo-script" . }}
{{ end }}